package com.onpositive.notes.argumnets;

import com.onpositive.notes.label.providers.BasicLabelProvider;
import com.onpositive.notes.model.ITemplateModel;

public class DoubleArgumentModel extends BasicArgumentModel<Double, DoubleArgument> {

	public DoubleArgumentModel() {
		super();
	}

	private static final long serialVersionUID = 1339632668428140436L;

	public DoubleArgumentModel(String name, boolean isRequired) {
		super(Double.class, name, new BasicLabelProvider<Double>(Double.class), isRequired );
	}

	@Override
	public DoubleArgument createInstance(Double value, ITemplateModel<?> templateModel) {
		DoubleArgument arg = new DoubleArgument(value, this, isRequired) ;
		arg.setTemplateModelId( templateModel.getId() ) ;
		return arg;
	}
}
